package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.FintechCredit;
import com.appkubes.mall.core.po.FintechCreditExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface FintechCreditMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechCreditSqlProvider.class, method="countByExample")
    long countByExample(FintechCreditExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @DeleteProvider(type=FintechCreditSqlProvider.class, method="deleteByExample")
    int deleteByExample(FintechCreditExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @Delete({
        "delete from fintech_credit",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @Insert({
        "insert into fintech_credit (user_key, app_key, ",
        "credit_amount, freeze_amount, ",
        "forzen_amount, risk_amount, ",
        "credit_status, approval, ",
        "creator, create_time, ",
        "updater, update_time, ",
        "version, handler_time)",
        "values (#{userKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{creditAmount,jdbcType=BIGINT}, #{freezeAmount,jdbcType=BIGINT}, ",
        "#{forzenAmount,jdbcType=BIGINT}, #{riskAmount,jdbcType=BIGINT}, ",
        "#{creditStatus,jdbcType=INTEGER}, #{approval,jdbcType=VARCHAR}, ",
        "#{creator,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updater,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, ",
        "#{version,jdbcType=VARCHAR}, #{handlerTime,jdbcType=TIMESTAMP})"
    })
    int insert(FintechCredit record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @InsertProvider(type=FintechCreditSqlProvider.class, method="insertSelective")
    int insertSelective(FintechCredit record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechCreditSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="credit_amount", property="creditAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="freeze_amount", property="freezeAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="forzen_amount", property="forzenAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="risk_amount", property="riskAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="credit_status", property="creditStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="approval", property="approval", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR),
        @Result(column="handler_time", property="handlerTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<FintechCredit> selectByExampleWithRowbounds(FintechCreditExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @SelectProvider(type=FintechCreditSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="credit_amount", property="creditAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="freeze_amount", property="freezeAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="forzen_amount", property="forzenAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="risk_amount", property="riskAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="credit_status", property="creditStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="approval", property="approval", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR),
        @Result(column="handler_time", property="handlerTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<FintechCredit> selectByExample(FintechCreditExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "user_key, app_key, credit_amount, freeze_amount, forzen_amount, risk_amount, ",
        "credit_status, approval, creator, create_time, updater, update_time, version, ",
        "handler_time",
        "from fintech_credit",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="user_key", property="userKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="credit_amount", property="creditAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="freeze_amount", property="freezeAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="forzen_amount", property="forzenAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="risk_amount", property="riskAmount", jdbcType=JdbcType.BIGINT),
        @Result(column="credit_status", property="creditStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="approval", property="approval", jdbcType=JdbcType.VARCHAR),
        @Result(column="creator", property="creator", jdbcType=JdbcType.VARCHAR),
        @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updater", property="updater", jdbcType=JdbcType.VARCHAR),
        @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.VARCHAR),
        @Result(column="handler_time", property="handlerTime", jdbcType=JdbcType.TIMESTAMP)
    })
    FintechCredit selectByPrimaryKey(String userKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechCreditSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") FintechCredit record, @Param("example") FintechCreditExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechCreditSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") FintechCredit record, @Param("example") FintechCreditExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @UpdateProvider(type=FintechCreditSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(FintechCredit record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table fintech_credit
     *
     * @mbg.generated
     */
    @Update({
        "update fintech_credit",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "credit_amount = #{creditAmount,jdbcType=BIGINT},",
          "freeze_amount = #{freezeAmount,jdbcType=BIGINT},",
          "forzen_amount = #{forzenAmount,jdbcType=BIGINT},",
          "risk_amount = #{riskAmount,jdbcType=BIGINT},",
          "credit_status = #{creditStatus,jdbcType=INTEGER},",
          "approval = #{approval,jdbcType=VARCHAR},",
          "creator = #{creator,jdbcType=VARCHAR},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "updater = #{updater,jdbcType=VARCHAR},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=VARCHAR},",
          "handler_time = #{handlerTime,jdbcType=TIMESTAMP}",
        "where user_key = #{userKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(FintechCredit record);
}